<!DOCTYPE HTML>
<html  lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-partymember-add">
			<div class="form-group">	
				<label class="col-sm-3 control-label">地域编号：</label>
				<div class="col-sm-8">
					<input id="aid" name="aid" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">党员小组：</label>
				<div class="col-sm-8">
					<input id="grouptype" name="grouptype" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">党员姓名：</label>
				<div class="col-sm-8">
					<input id="uname" name="uname" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">性别：</label>
				<div class="col-sm-8">
					<select class="chosen-select form-control" id="sex" name="sex"  type="text">
						<option value="男">男</option>
						<option value="女">女</option>
						<option value="未知">未知</option>
					</select>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">民族：</label>
				<div class="col-sm-8">
					<input id="nations" name="nations" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">身份证号码：</label>
				<div class="col-sm-8">
					<input id="idcard" name="idcard" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">学历：</label>
				<div class="col-sm-8">
					<input list="edulevel"  name="edulevel" class="form-control" placeholder="请输入/选择学历"/>
					<datalist id="edulevel">
						<option value="硕士研究生">
						<option value="本科">
						<option value="大专">
						<option value="中专">
						<option value="高中">
						<option value="初中">
						<option value="小学">
					</datalist>
				</div>
			</div>

			<div class="form-group">
				<label class="col-sm-3 control-label">出生年月：</label>
				<div class="col-sm-8">
					<input class="form-control laydate-icon  layer-date"
						   name="birthday"
						   id="birthday"
						   value=""
						   readonly="readonly"
						   style="width:120px;"
						   placeholder="出生年月"
						   title="出生年月"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">入党日期：</label>
				<div class="col-sm-8">
					<input class="form-control laydate-icon  layer-date"
						   name="partyjoindate"
						   id="partyjoindate"
						   value=""
						   readonly="readonly"
						   style="width:120px;"
						   placeholder="入党日期"
						   title="入党日期"/>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">电话号码：</label>
				<div class="col-sm-8">
					<input id="phone" name="phone" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">家庭住址：</label>
				<div class="col-sm-8">
					<input id="address" name="address" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">备注：</label>
				<div class="col-sm-8">
					<input id="notes" name="notes" class="form-control" type="text">
				</div>
			</div>
			<!--<div class="form-group">	-->
				<!--<label class="col-sm-3 control-label">微信用户编号：</label>-->
				<!--<div class="col-sm-8">-->
					<!--<input id="uid" name="uid" class="form-control" type="text">-->
				<!--</div>-->
			<!--</div>-->
			<!--<div class="form-group">	-->
				<!--<label class="col-sm-3 control-label">微信号：</label>-->
				<!--<div class="col-sm-8">-->
					<!--<input id="wcid" name="wcid" class="form-control" type="text">-->
				<!--</div>-->
			<!--</div>-->
		</form>
	</div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "village/partymember"
        $("#form-partymember-add").validate({
            rules: {
                aid: {
                    required: true,
                    minlength: 2
                },
                grouptype: {
                    required: true,
                    minlength: 2
                },
                nations: {
                    required: true,
                    minlength: 2
                },
                uname: {
                    required: true,
                    minlength: 2
                },
                idcard: {
                    required: true,
                    minlength: 15
                },
                phone: {
                    required: true,
                    minlength: 11
                }
            },
            messages: {
                aid: {
                    required: "请输入地域编号",
                    minlength: "地域编号不能小于2个字符"
                },
                grouptype: {
                    required: "请输入党员小组",
                    minlength: "党员小组不能小于2位"
                },
                nations: {
                    required: "请输入名族",
                    minlength: "名族不能小于2个字符"
                },
                uname: {
                    required: "请输入党员姓名",
                    minlength: "党员姓名不能小于2个字符"
                },
                idcard: {
                    required: "请输入身份证号码",
                    minlength: "身份证号码不能小于15个字符"
                },
                phone: {
                    required: "请输入手机号码",
                    minlength: "号码长度不能小于11位"
                }
            }
        });
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/add", $('#form-partymember-add').serialize());
	        }
	    }
	</script>
	<script th:src="@{/js/plugins/layer/laydate/laydate.js}"></script>
	<script th:src="@{/js/plugins/layer/layui-v2.4.5/layui/layui.js}"></script>
	<!--时间插件-->
	<script>
        laydate({
			elem:"#partyjoindate",
            event:"focus"
        });
        laydate({
            elem:"#birthday",
            event:"focus"
        });
        layui.use('laydate', function(){
            var laydate = layui.laydate;

            //执行一个laydate实例
            laydate.render({
                elem:"#village",
                type: 'time',

            });
        });
	</script>
</body>
</html>
